<?php include "top.php"; ?>
 <?php
		 $nid=make_safe($_GET["nid"]); 
		 $BigClassName=make_safe($_GET["BigClassName"]); 
		 $title=make_safe($_GET["title"]); 
		 if($nid==""){$nid=1;}
		 
		 if($nid==1){$nidname="公司樣本";}
		 if($nid==2){$nidname="禮服";}
		 if($nid==3){$nidname="客戶";}
		 
		 
		?>
      <div id="top-3">
        <div id="m-text-1">
        <table border="0" cellpadding="0" cellspacing="0" class="tab-5">
   <tr>
     <td valign="top"><div class="tab-5-tit">主功能列表</div>
     <div class="m-text-2_btn"><a href="category.php?nid=<?php echo $nid;?>">作品分類管理</a></div>
	 
	 <div class="m-text-2_btn"><a href="target.php?nid=<?php echo $nid;?>" >標簽管理</a></div>
	 
     
    <div class="tab-5-tit">相簿管理</div>
      
	 
	 <?php
  $n=1;

  $sql="select * from product_type_big where nid='$nid' order by orderid  ";			
	$result=mysql_query($sql);
	while ($row=mysql_fetch_object($result)){
	?>
     <div class="m-text-2_btn"><a href="working.php?nid=<?php echo $nid;?>&BigClassName=<?php echo urlencode($row->BigClassName);?>"><?php echo $row->BigClassName;?></a></div>
     <?php }?>
	 
       </td>
   </tr>
   </table>
        </div>
		
		
		
		
		
		
       </td>
   </tr>
   </table>
        </div>
        <div id="m-text-2_banner">
          <ul>
          
            <li><a href="target_add.php?nid=<?php echo $nid;?>">新增</a></li>
            <li><?php echo $nidname;?>標簽分類管理</li>
          </ul>
        </div><div id="m-text-2">





<script language="javascript"> 



function Checker(){ 


  
// document.write(document.form2.id.length)
  
  
  
   //if(document.form2.yaoyun.value==""){document.write("您按了确认！") }
   
   //  document.write("您按了确认！") 

   

document.form2.items.value = "";         //设置隐藏域的值为空
if ( !document.form2.id.length ) {      //只有一个复选框，form2.item.length = undefined



	if ( document.form2.id.checked ){
	document.form2.items.value = document.form2.id.value; 
	
	
	} 
}else { 

	var temp="";
	for ( i = 0 ; i < document.form2.id.length ; i++ ){ 
		if ( document.form2.id[i].checked ){       //复选框中有选中的框 
			temp=temp+document.form2.id[i].value+",";   //将数组中的元素使用","分隔
		}	 

	} 
	temp=temp.substring(0,temp.length-1);     //去除字符串末尾多余的","
	document.form2.items.value = temp;    //将变量赋值给隐藏域
	
//	document.write(document.form2.items.value)
} 
} 
</script>  

<script language="javascript">
function CheckAll(elementsA,elementsB)
{
	var len = elementsA;
	if(len.length > 0)
	{
		for(i=0;i<len.length;i++)
		{
			elementsA[i].checked = true;
		}
		if(elementsB.checked ==false)
		{
			for(j=0;j<len.length;j++)
			{
				elementsA[j].checked = false;
			}
		}
	}
	else
	{
		len.checked = true;
		if(elementsB.checked == false)
		{
			len.checked = false;
		}
	}
}
</script>



<SCRIPT language=javascript>

function ConfirmDel()
{
   if(confirm("確定要刪除選擇的訊息嗎？一旦刪除將不能恢複！"))
     return true;
   else
     return false;
	 
}

</SCRIPT>







<form name="form2" method="Post" action="target_del.php?nid=<?php echo $nid;?>" onSubmit="Checker()">


	 <?php
  $n=1;

  $sql="select * from target where nid='$nid' order by id  ";			
	$result=mysql_query($sql);
	while ($row=mysql_fetch_object($result)){
	?>
<table border="0" cellpadding="0" cellspacing="0" class="m-text-2-con-2">
  <tr>
    <td class="m-text-2-con1"><input name="id" type="checkbox" id="id" value="<?php echo $row->id;?>"></td>
    <td class="m-text-2-con-21"><?php echo $row->content;?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a style="color:#000000" href="target_xiugai.php?id=<?php echo $row->id;?>">修改</a></td>
  </tr>
</table>
<?php }?>



<table border="0" cellpadding="0" cellspacing="0" class="m-text-2-con">
          <tr> <input type="hidden" name="items" value="<?php echo $item; ?>">
            <td width="250" height="30"><input name="chk_all" type="checkbox" id="chk_all" value="checkbox" onClick="CheckAll(this.form.id,this.form.chk_all)">
              選擇本頁顯示的所有訊息</td>
            <td><input name="submit" type='submit' value='刪除選擇的訊息' onClick="return ConfirmDel();"></td>
          </tr>
        </table>
</form>







        </div>
      </div>
    </div>
  </div>
</div>
<div id="botton"><div id="copyright"><table border="0" cellpadding="0" cellspacing="0" class="copy">
  <tr>
    <td>© COPYRIGHTS 2010 INC. APARTMENT STUDIO All rights reserved.</td>
  </tr>
</table>
</div></div>
</body>
</html>